import { request } from 'umi';

export async function fakeSubmitForm(params: any) {
  return request('/api/cmsMedicalExperience/save', {
    method: 'POST',
    data: params,
  });
}

export async function queryExperienceDetail(params: any) {
  return request('/api/cmsMedicalExperience/' + params.id, {
    method: 'get',
    data: params,
  });
}

export async function list(params: any) {
  return request('/api/cmsMedicalExperience/page', {
    method: 'POST',
    data: params,
  });
}

/** 修改文章 PUT /api/Experience */
export async function updateExperience(params: any) {
  return request('/api/cmsMedicalExperience/updateById', {
    method: 'PUT',
    data: params,
  });
}

/** 删除文章 DELETE /api/Experience */
export async function removeExperience(data: { key: number[] }, options?: { [key: string]: any }) {
  return request<Record<string, any>>('/api/cmsMedicalExperience/' + data.key, {
    data,
    method: 'DELETE',
    ...(options || {}),
  });
}
